//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.kun.portal.webframe.dao;

import com.kun.portal.webframe.po.FwRolePo;
import com.kun.portal.webframe.po.FwTeamPo;
import java.util.List;
import java.util.Set;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.data.jpa.repository.*;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

//@Repository
public interface FwTeamDao extends JpaRepository<FwTeamPo, String>, JpaSpecificationExecutor<FwTeamPo> {
    Page<FwTeamPo> findByCreatorAndTeamNameContainingOrderByTeamCode(String var1, String var2, Pageable var3);

    FwTeamPo findByTeamId(String var1);

    @Transactional
    @EntityGraph(value="load_userList",type= EntityGraph.EntityGraphType.FETCH)
    public List<FwTeamPo> findAll();

    @Transactional
    @EntityGraph(value="load_userList",type= EntityGraph.EntityGraphType.FETCH)
    public List<FwTeamPo> findAll(Specification specification);

    @Query("select p.roleSet from FwTeamPo p where p.teamId =?")
    Page<FwRolePo> findRoleByTeamId(String var1, Pageable var2);

    @Query("select p from FwTeamPo p where p.teamCode=?")
    List<FwTeamPo> findByTeamCode(String var1);

    @Query("select p from FwTeamPo p where p.teamId like ?1 order by p.teamId")
    List<FwTeamPo> findTeamAndChildren(String var1);

    @Modifying
    @Query(
            value = "delete from fw_team_user where user_id=?1",
            nativeQuery = true
    )
    void deleteFwTeamUserByUserId(String var1);

    @Modifying
    @Query(
            value = "delete from fw_team_user where user_id=?1 and team_id=?2",
            nativeQuery = true
    )
    void deleteFwTeamUserByUserIdAndTeamId(String var1, String var2);

    Set<FwTeamPo> findByTeamIdLike(String var1);

    List<FwTeamPo> findByTeamName(String var1);
}
